package edu.ccut.titan.tag.report.chart.dataset;

import net.sf.jasperreports.charts.design.JRDesignTimeSeries;
import net.sf.jasperreports.charts.design.JRDesignTimeSeriesDataset;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.design.JRDesignExpression;
import edu.ccut.titan.tag.report.design.ChartsInfo;

public class TitanTimeSeriesDataset implements ITitanDataset {

	public JRChartDataset getDatasetContent(ChartsInfo chart) {
		JRDesignTimeSeriesDataset designTimeSeriesDataset = new JRDesignTimeSeriesDataset(
				null);
		JRDesignTimeSeries timeSeries = new JRDesignTimeSeries();
		JRDesignExpression seriesExpression = new JRDesignExpression();
		timeSeries.setSeriesExpression(seriesExpression);
		JRDesignExpression timePeriodExpression = new JRDesignExpression();
		timeSeries.setTimePeriodExpression(timePeriodExpression);
		JRDesignExpression valueExpression = new JRDesignExpression();
		timeSeries.setValueExpression(valueExpression);
		designTimeSeriesDataset.addTimeSeries(timeSeries);
		return designTimeSeriesDataset;
	}

}
